<?php

/**
 * Class ActionLogic
 */
class ActionLogic extends Model
{
    private $_customerId = null;
    private $_modelAction = null;

    public function __construct()
    {
        $this->_customerId = Session::$user['customerId'];
        Session::switchCustomer(0);

        $this->_modelAction = D('Action');

        Session::switchCustomer($this->_customerId);
    }

    /** --------------------------------------  增  -------------------------------------- */
    /** --------------------------------------  删  -------------------------------------- */
    /** --------------------------------------  改  -------------------------------------- */



    /** --------------------------------------  查  -------------------------------------- */

    /**
     * 根据功能点的id列表, 获得对应的name列表
     *
     * @param $actionIds
     * @return mixed
     */
    public function getActionNamesByIds($actionIds)
    {
        return $this->_modelAction->where(['id' => ['IN', $actionIds]])->select();
    }
}